﻿#include "ssAxesRender.h"
#include "../../node/ssNode.h"


namespace StarSeeker
{

ssAxesRender::ssAxesRender()
{
	m_primitiveType = SS_PRIMITIVE_LINE;
	m_axesLength = 100.0f;
}

ssAxesRender::~ssAxesRender()
{
}

void ssAxesRender::CreateAxes( ssfloat axesLength )
{
	//ssfloat v[4 * 3] = { 0.0f, 0.0f, 0.0f, axesLength, 0.0f, 0.0f, 0.0f, axesLength, 0.0f, 0.0f, 0.0f, axesLength };
	//u8 f[2*3] = {0,1,0,2,0,3};
	//ssfloat c[4 * 4] = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f };

	//SetVertex(12, v);
	//SetColor(16, c);
	//SetIndex(6, f, SS_INDEX_8);
	SetDataFromMesh("axes");
	m_axesLength = axesLength;
}

void ssAxesRender::OnAdd()
{
	GetNode()->Transform().SetScaling(m_axesLength, m_axesLength, m_axesLength);
}

}
